package service;

import java.util.List;

import beans.repairBean;
import db.RepairRequestDAO;

public class RepairService<Repair> {
	private RepairRequestDAO repairDao;

	public RepairService() {
	    repairDao = new RepairRequestDAO();
	}

	public void addRepair(Repair repair) {
	    repairDao.addRepair(repair);
	}

	public void updateRepair(Repair repair) {
	    repairDao.updateRepair(repair);
	}

	public void deleteRepair(int id) {
	    repairDao.addRepair(id);
	}

	public repairBean getRepairById(int id) {
	    return repairDao.getRepairRequest(id);
	}

	public List<Repair> getAllRepairs() {
	    return repairDao.getAllRepairRequests();
	}


}
